#ifndef __BSP_SS_H__
#define __BSP_SS_H__

#include "config.h"
//#include <stdint.h>

#include "hc32_ddl.h"





/* ADC1 channel definition for this example. */
//#define ADC1_SA_NORMAL_CHANNEL      (ADC1_CH_INTERNAL)
#define ADC1_SA_CHANNEL             (ADC1_CH15)
#define ADC1_SA_CHANNEL_COUNT       (1u)

#define ADC1_CHANNEL                (ADC1_SA_CHANNEL)

#define ADC1_INTERNAL_INDEX         (ADC_CH_IDX15)

/* ADC1 channel sampling time.      ADC1_CH_INTERNAL */
#define ADC1_SA_CHANNEL_SAMPLE_TIME { 0x30 }



/* S2 Port/Pin definition */
#define BSP_S2_PORT              (PortC)
#define BSP_S2_PIN               (Pin04)
#define S2OutHigh()              (PORT_SetBits(BSP_S2_PORT,BSP_S2_PIN))
#define S2OutLow()               (PORT_ResetBits(BSP_S2_PORT,BSP_S2_PIN))
#define S2Toggle()               (PORT_Toggle(BSP_S2_PORT,BSP_S2_PIN))

#define S2Out()                  S2OutHigh()
#define S2In()                   S2OutHigh()
#define S2InLow()                (PORT_GetBit(BSP_S2_PORT, BSP_S2_PIN) == Reset)
#define S2InHigh()               (PORT_GetBit(BSP_S2_PORT, BSP_S2_PIN) == Set)


void BspSsInit(void);
uint16 BspS1AdVal(void);

#endif
